Skip to content

fix: add generic overlay to remove redundant allOf inline enums#73

Merged
mattapperson merged 1 commit intomainfrom
fix/allof-simplify-overlay
Apr 3, 2026
Merged

fix: add generic overlay to remove redundant allOf inline enums#73
mattapperson merged 1 commit intomainfrom
fix/allof-simplify-overlay

Conversation

@mattapperson
Copy link
Copy Markdown
Collaborator

Summary

  • Add allof-simplify.overlay.yaml with a generic JSONPath filter: $..allOf[?@.enum && !@['$ref']]
  • Removes inline enum constraints that duplicate a $ref enum in the same allOf
  • These are artifacts from zod-openapi's .extend() serialization
  • Reduces Speakeasy duplicate-inline-schemas warnings by ~8 (all allOf+enum patterns)
  • Generic — automatically handles any new schemas that produce this pattern

Test plan

  • speakeasy overlay validate passes
  • speakeasy overlay apply successfully removes redundant enums
  • speakeasy lint confirms reduction in duplicate warnings

Add allof-simplify.overlay.yaml that uses a generic JSONPath filter
to remove inline enum constraints that duplicate a $ref enum in the
same allOf. These are artifacts from zod-openapi's .extend()
serialization and cause Speakeasy duplicate-inline-schemas warnings.
@mattapperson mattapperson merged commit dd8e6bd into main Apr 3, 2026
@mattapperson mattapperson deleted the fix/allof-simplify-overlay branch April 3, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant